<template>
    <div>
        <van-tabs type='link' @click="togo">
            <van-tab title="关注"></van-tab>
            <van-tab title="社区"></van-tab>
            <van-tab title="优品"></van-tab>
        </van-tabs>
        <div class="center">
            <router-view/>
        </div>
      
    </div>
</template>

<script>
    export default {
        name:'Afterattention',
        methods: {
            togo(index){
                if(index == 0){
                    this.$router.push('/afterattention')
                }else if(index == 2){
                     this.$router.push('/bestitem')
                }else if(index == 1){
                    this.$router.push('/pregnancy')
                }
            }
        }
    }
    
</script>

<style scoped>
    .center{
        padding: 46px 0;
        overflow: auto;
    }
   .van-tabs >>> .van-tabs__wrap{
        position: fixed
    }
</style>